Skip to content

Conversation

@paris3200
Copy link
Owner

Summary

Implements weekly notes functionality as outlined in IMPROVEMENTS.md (top priority recommendation). This adds comprehensive support for ISO week-based notes to complement the existing daily notes feature.

Features Added

Core Functionality

  • Weekly notes module (lua/markdown-notes/weekly.lua) with proper ISO week number calculation
    • ISO weeks start on Monday
    • Week 1 is the week containing the first Thursday of the year
    • Filename format: W{week}-{year}-Weekly-Review.md (e.g., W03-2025-Weekly-Review.md)

New Keybindings

  • <leader>nw - Open this week's note
  • <leader>nwl - Open last week's note
  • <leader>nwn - Open next week's note
  • <leader>nW - Workspace picker (changed from <leader>nw to avoid conflict)

New Commands

  • :MarkdownNotesWeeklyOpen [offset] - Open weekly note with optional week offset
  • :MarkdownNotesDailyOpen [offset] - Added daily command for consistency

Enhanced Template Variables

Added missing template variables that were referenced in templates but not defined:

  • {{week_number}} - ISO week number (e.g., "03")
  • {{week_year}} - Year for the week (e.g., "2025")
  • {{week_id}} - Week identifier (e.g., "W03-2025")
  • {{full_date}} - Full date format (e.g., "Wednesday, January 15, 2025")
  • {{year}} - Current year
  • {{month}} - Current month name
  • {{day_name}} - Current day name

Documentation

  • Updated README with comprehensive weekly notes documentation
  • Added example Weekly.md template
  • Updated keybindings reference table
  • Added template variables reference
  • Included usage examples and workflow guidance

Testing

  • Added tests/markdown-notes/weekly_spec.lua test file
  • Follows same pattern as existing daily notes implementation

Breaking Changes

  • Workspace picker keymap changed from <leader>nw to <leader>nW (capital W) to accommodate weekly notes

Closes

Fixes #16

Checklist

  • New Lua module created with proper structure
  • Keybindings added and documented
  • User commands created
  • Template variables added
  • Tests written
  • README updated with examples
  • Follows existing code patterns

Add comprehensive weekly notes functionality to complement daily notes:

- Create weekly.lua module with ISO week number calculation
- Add keybindings: <leader>nw (this week), <leader>nwl (last week), <leader>nwn (next week)
- Change workspace picker to <leader>nW to avoid keymap conflict
- Add :MarkdownNotesWeeklyOpen command with offset support
- Add template variables: week_number, week_year, week_id, full_date, year, month, day_name
- Include weekly_spec.lua test file
- Update README with weekly notes documentation and examples

Weekly notes use format: W{week}-{year}-Weekly-Review.md
ISO weeks start on Monday, Week 1 contains first Thursday of year
Automatically applies Weekly.md template if available

Fixes #16
Changed weekly_note_this_week keybinding from <leader>nw to <leader>nww
to prevent WhichKey waiting for additional keys when <leader>nwl and
<leader>nwn are also bound. Also clarified workspace picker uses <leader>nW.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Automatic year-based folder organization for daily notes

2 participants